package com.fesco.mis.fm.config.jdbc;

/**
 * <descption>数据源容器</descption>
 * @date ：2017/9/1 15:13
 * @author：梅海波<meihaibo13186@sinosoft.com.cn>
 * @version:0.1
 */
public class DataSourceContextHolder {

    private static final ThreadLocal<DataBaseSourceType> contextHolder = new ThreadLocal<>();

    public static void setDataSourceType(DataBaseSourceType dataSourceType) {
        contextHolder.set(dataSourceType);
    }

    public static DataBaseSourceType getDataSourceType() {
        return contextHolder.get();
    }

    public static void clearDataSourceTypeType() {
        contextHolder.remove();
    }

}